/*
 * @Author: your name
 * @Date: 2020-08-24 08:56:47
 * @LastEditTime: 2020-08-24 21:59:59
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \xmgj-app-new\js\containers\logistics-platform\shipper-app\source\components\FlagView.js
 */
import React from 'react';
import { StyleSheet, Text } from 'react-native';
import { px2dp } from '../../../../../common/styles';
import LinearGradient from 'react-native-linear-gradient'
/**
 * @author kanglang
 * @description 起->终 标记
 * @createDate 2020/7/27
 */
export default function FlagView(
    { style, colors = ['#7EE35E', '#2CBD26'], tips="马" } = this.props
) {
    return (
        <LinearGradient
            style={[styles.common, style]}
            stystart={{ x: 1, y: 1 }} end={{ x: 1, y: 1 }}
            colors={colors}
        >
            <Text style={styles.tips}>{tips}</Text>
        </LinearGradient>
    );
}
const styles = StyleSheet.create({
    common: {
        height: px2dp(16) * 2,
        width: px2dp(16) * 2,
        borderRadius: px2dp(3) * 2,
        justifyContent: 'center',
        alignItems: 'center'
    },
    tips: {
        color: '#FFFFFF',
        fontSize: px2dp(11) * 2,
        fontWeight: 'bold'
    }
});